package com.gnerv.oauth.controller;

import com.gnerv.oauth.dto.ClientDetailsDTO;
import com.gnerv.oauth.entity.Result;
import com.gnerv.oauth.service.ClientService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/api/oauth/client")
public class ClientController {

    @Resource
    ClientService clientService;

    @RequestMapping(value = "/save", method = RequestMethod.POST)
    public Result saveClient(@RequestBody ClientDetailsDTO clientDetailsDTO, String aaa, String bbb){
        clientService.saveClient(clientDetailsDTO);
        return Result.response();
    }

}
